package com.zlp.mall.upms.dto.req;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import javax.validation.constraints.NotNull;
import javax.validation.constraints.Pattern;
import java.io.Serializable;
import java.util.List;

@Data
@ApiModel(value = "创建用户请求参数")
public class UserCreateReq implements Serializable {


    @NotNull(message = "用户名为空")
    @ApiModelProperty(value = "用户名")
    private String username;

    @NotNull(message = "密码为空")
    @ApiModelProperty(value = "密码")
    private String password;


    @NotNull(message = "手机号为空")
    @Pattern(regexp = "^1[0-9]{10}$",message = "手机号码格式不匹配,必须是11位数字！")
    @ApiModelProperty(value = "手机号")
    private String phone;

    @ApiModelProperty(value = "头像地址")
    private String avatar;

    @ApiModelProperty(value = "用户所属部门id")
    private Integer deptId;

    @ApiModelProperty(value = "角色ID")
    private List<Integer> role;

}
